<!doctype html>
<html  class="x-admin-sm">
<head>
	<title>芯佑科技CMS系统登录</title>
    <#include "/back/common.html">
    <script src="/website/js/jq-cookie.js"></script>
</head>
<body class="login-bg" style="background-image: url('/back/images/background.jpg')">
    
    <div class="login layui-anim layui-anim-up">
        <div class="message">芯佑科技CMS系统登录</div>
        <div id="darkbannerwrap"></div>
        
        <form method="post" class="layui-form" id="loginForm" >
            <input name="phone" id="phone" placeholder="用户名"  type="text" lay-verify="required" class="layui-input" >
            <hr class="hr15">
            <input name="password" id="password" lay-verify="required" placeholder="密码"  type="password" class="layui-input">
            <hr class="hr15">
            <input value="登录" lay-submit lay-filter="login" style="width:100%;" type="submit">
            <hr class="hr20" >
        </form>
    </div>

    <script>
        $(document).ready(function () {
            if (window != top) {
                top.location.href = location.href;
            }
        });
        $(function  () {
            layui.use('form', function(){
              var form = layui.form;
              form.on('submit(login)', function(data){
                  $.ajax({
                      url: "/user/login",
                      type: 'post',
                      data: $("#loginForm").serialize(),
                      success: function (resp) {
                          if (resp.code=="200") {
                              Shadow.success("登录成功")
                              location.href='/back/index'
                          } else {
                              Shadow.error(resp.message)
                          }
                      },
                      error: function (resp) {
                         Shadow.error("异常错误,请刷新重试");
                      }
                  })
                return false;
              });
            });
        })
    </script>
</body>
</html>